home *** CD-ROM | disk | FTP | other *** search
- : {
- This converts an ip address (which you provide)
- into a 32 bit internet address, ala what DCC uses.
- One small problem -- epic does math with 'long's and
- not 'unsigned long's and so ip addresses above 128.*
- result in negative values. How to fix this is left
- as an exercise for the reader.
-
- Written in November, 2000
- }
-
- alias ip_to_int (ip, void)
- {
- @ :ip_list = split(. $ip)
- @ :ip32 = 0
- for xx in ($ip_list) {
- @ ip32 = (ip32 << 8) + xx
- }
- return $ip32
- }
-
- #hop'y2k
-